import React, { Component } from "react";
import Input from "./Input";

class App extends Component {
  state = {
    value: "123",
  };

  handleChange = (value, e) => {
    console.log("值改变了", e);
    this.setState({
      value: value,
    });
  };

  render() {
    return (
      <>
        <h2>input组件</h2>
        <Input
          value={this.state.value}
          onChange={this.handleChange}
          maxLength={8}
        />
      </>
    );
  }
}

export default App;
